//
//  DYMemberSearchVC.m
//  kafuMerchant
//
//  Created by 帝云科技 on 2018/9/20.
//  Copyright © 2018年 帝云科技. All rights reserved.
//

#import "DYMemberSearchVC.h"

@interface DYMemberSearchVC ()

@property (nonatomic,strong)UITextField *searchTextField;
@property (nonatomic,assign)BOOL isSearch;

@end

@implementation DYMemberSearchVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self titleView];
}
-(void)titleView
{
    self.searchTextField=[[UITextField alloc]initWithFrame:CGRectMake(20, 0, BILIWIDTH(270), 30)];
    self.searchTextField.backgroundColor=XHQRGB(231, 231, 231);
    [self.searchTextField xhq_cornerRadius:5];
    UIImageView *left=[[UIImageView alloc]initWithFrame:CGRectMake(0,7, BILIWIDTH(40),15)];
    left.image=IMG(@"icon_searchs");
    left.contentMode=UIViewContentModeScaleAspectFit;
    self.searchTextField.leftView=left;
    self.searchTextField.leftViewMode=UITextFieldViewModeAlways;
    self.searchTextField.placeholder=@"会员昵称/会员手机号";
    self.searchTextField.font=kFont(14);
    [self.searchTextField setValue:[UIColor xhq_content] forKeyPath:@"_placeholderLabel.textColor"];
    self.navigationItem.titleView=self.searchTextField;
    
    [self createRightBarItem:nil titleString:@"搜索"];
    
    UIButton *right=self.navigationItem.rightBarButtonItem.customView;
    [right setTitleColor:[UIColor xhq_aTitle] forState:UIControlStateNormal];
    
}
-(void)rightClick
{
    self.isSearch=YES;
}

-(void)dy_refresh
{
    if (self.isSearch) {
        
    }else{
        [self.tableView.mj_header endRefreshing];
    }
}
-(void)dy_loadMore
{
    if (self.isSearch) {
        
    }else{
        [self.tableView.mj_footer endRefreshing];
    }
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
